home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 3.1 KB | 111 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Selection.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SELECTION_H
- #define SELECTION_H
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CELL_H
- #include "Cell.h"
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWSELECT_H
- #include "FWSelect.h"
- #endif
-
- //==============================================================================
- // Forward declarations
- //==============================================================================
-
- class CTablePart;
- class CTableProxy;
- class CTableContent;
- class CTableSelectionContent;
-
- //==============================================================================
- // class CTableSelection
- //==============================================================================
-
- class CTableSelection : public FW_CSelection
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CTableSelection)
-
- CTableSelection(Environment* ev, CTablePart* tablePart, CTableContent* content);
- virtual ~ CTableSelection();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_Boolean IsEmpty(Environment* ev) const;
- virtual void CloseSelection(Environment* ev);
- virtual void ClearSelection(Environment* ev);
- virtual void SelectAll(Environment* ev);
-
- virtual FW_CContent* GetSelectedContent(Environment* ev);
-
- // ----- Drag and Drop -----
- virtual ODShape* CreateSelectionShape(Environment* ev, ODFacet* facet, FW_CFrame* frame) const;
-
- virtual FW_Boolean IsMouseInDraggableItem(Environment* ev,
- FW_CFrame* frame,
- const FW_CMouseEvent& theMouseEvent,
- FW_Boolean inBackground);
-
- virtual void UpdateSelectionOnMouseDown(Environment* ev,
- const FW_CMouseEvent& mouseEvent,
- ODFacet* embeddedFacet,
- FW_Boolean inEmbeddedFrameBorder,
- FW_Boolean inBackground);
-
- // ----- Linking Support -----
- virtual FW_Boolean CanPasteAsLink(Environment* ev,
- ODPasteAsMergeSetting& setting,
- ODStorageUnit* su);
-
- virtual FW_Boolean IsSelectionLinkable(Environment* ev);
- // Don't allow publishing if cell is a link destination
-
- virtual FW_CLinkSource* DoFindLinkSource(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- CCell GetSelectedCell() const;
-
- // ----- Selection -----
- void Select(Environment* ev, const CCell& cell);
-
- void InvalidateSelection(Environment* ev);
-
- void SelectProxy(Environment* ev, CTableProxy* proxy);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- CTablePart* fTablePart;
- CTableContent* fTableContent;
- CTableSelectionContent* fSelectionContent;
- };
-
-
- #endif
-